
#include <memory>
#include <string>
#include "tcpserver.hpp"


void useTips(char* command)
{
    std::cout << "useTips:" << command << " port" << std::endl;
}

int main(int argc, char* argv[])
{

    if(argc != 2)
        useTips(argv[0]);

    //1、创建服务器
    std::unique_ptr<TcpServer> svr = std::make_unique<TcpServer>(stoi(argv[1]));

    //2、初始化服务器
    svr->initServer();

    //3、启动服务器
    svr->startServer();

    return 0;
}